{% if app is defined and app.request is defined and app.request is not null and app.request.isXmlHttpRequest != true %}
    <div class="snackbar">
        <div id="snackbar"
             class="d-none snackbar"></div>
        {% for message in app.flashes('success') %}
            <div class="bg-success innerOnce">{{ message }}</div>
        {% endfor %}
        {% for message in app.flashes('danger') %}
            <div class="bg-danger innerOnce">{{ message }}</div>
        {% endfor %}
        {% for message in app.flashes('warning') %}
            <div class="bg-warning innerOnce">{{ message }}</div>
        {% endfor %}
    </div>

    {% set modalUrl = app.flashes('modalUrl') %}
    {% if modalUrl |length > 0 %}
        <script>
            var modalUrl = '{{ modalUrl[0] }}';
        </script>
    {% endif %}

    <script>
        var blankTarget = [
            {% for target in app.flashes('_blank') %}
            '{{ target }}'
            {% endfor %}
        ]
    </script>
{% endif %}

